package com.googlecode.iiddefecttracker.sample;

import static com.googlecode.iiddefecttracker.sample.ProjectTestData.testProject;

import java.util.Arrays;
import java.util.List;

import com.googlecode.iiddefecttracker.domain.Defect;
import com.googlecode.iiddefecttracker.domain.DefectBeanImpl;

/**
 * 
 */
public class DefectTestData {
    
    private static Defect defectOne;
    
    public static List<Defect> allDefectTestData() {
        return Arrays.asList(defectOne());
    }
    
    public static Defect defectOne() {
        
        if (defectOne == null) {
            defectOne = new DefectBeanImpl();
            defectOne.setProject(testProject());
            defectOne.setSummary("Bug with x screen when saving y");
            defectOne.setStepsToRecreate("recreate by: ");
            defectOne
                    .setResult("Result is unable to save x, get error message");
            defectOne.setExpectedResult("should be able to save");
            defectOne.setWorkaround(null);
        }
        
        return defectOne;
    }
}
